<?php /** @var \Pinenut\Action $this */ ?>
<?php $this->registerResourcePackage('iCheck');?>

<div class="form-group">
	<div class="container-fluid">
		<div class="row">
			<label class="col-sm-2 control-label"><?php echo $params['label']; ?></label>
			<div class="col-sm-5">
				<div
					data-trigger="manual"
					data-toggle="popover"
					data-placement="auto left"
					data-errors="<?php echo json_encode($errors)?>">

						<?php foreach($params['options'] as $optionValue => $optionTitle) { ?>
							<div>
								<label>
									<input
										type="radio"
										name="<?php echo $name ?>"
										value="<?php echo $this->txt2attr($optionValue) ?>"
										<?php echo ($value == $optionValue) ? 'checked' : ''; ?>
									>
									<span class="radio-button-title">
										<?php echo $this->txt2html($optionTitle)?>
									</span>
								</label>
							</div>
						<?php } ?>
				</div>
			</div>
		</div>
	</div>
</div>
